從內容功能表中啟用自訂掃描工作的啟動

您可以從 Microsoft Windows 資源管理器的內容功能表中啟用針對一個或多個檔案之自訂掃描工作的啟動。

要從內容功能表啟用自訂掃描工作的啟動:

  1. 建立以下 REG 檔案:

    Windows 登錄檔編輯器版本 5.0.0

    [HKEY_CLASSES_ROOT\Directory\shell\ksws\command]

    @="C:\\Temp\\scan.cmd \"%1\""

    [HKEY_CLASSES_ROOT\*\shell\ksws\command]

    @="C:\\Temp\\scan.cmd \"%1\""

    [HKEY_CLASSES_ROOT\Directory\shell\ksws]

    @="Scan with Kaspersky Security for Windows Server\"

    "Icon"="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavtrayr.dll\",0"

    [HKEY_CLASSES_ROOT\Directory\shell\ksws\DefaultIcon]

    @="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavtrayr.dll\",0"

    [HKEY_CLASSES_ROOT\*\shell\ksws]

    @="Scan with Kaspersky Security for Windows Server\"

    "Icon"="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavtrayr.dll\",0"

    [HKEY_CLASSES_ROOT\*\shell\ksws\DefaultIcon]
    @="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavtrayr.dll\",0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]

    "C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavshell.exe"="~ RUNASADMIN"

    您需要指定 Kaspersky Security for Windows Server 安裝資料夾的實際位置。

  2. 建立具有以下內容的 scan.cmd 檔案:

    @echo off
    set LOGNAME=%RANDOM%

    "C:\Program Files (x86)\Kaspersky Lab\Kaspersky Security for Windows Server\kavshell.exe" scan "%~1" /W:c:\temp\%LOGNAME%.txt

    echo Scanning is in progress...
    type c:\temp\%LOGNAME%.txt
    del c:\temp\%LOGNAME%.txt

    timeout /t -1

    scan.cmd 檔案必須包含以下資訊:

    • kavshell.exe 檔案的位置。
    • 包含掃描結果的暫時檔案位置。
    • KAVSHELL SCAN 指令的參數。
    • 用於在工作完成後關閉主控台視窗的逾時值。
  3. scan.cmd 檔案複製到 [HKEY_CLASSES_ROOT\Directory\shell\ksws\command] REG 檔案中指定的資料夾。

    範例中使用了 C:\Temp 資料夾。

您無需重新啟動作業系統。

頁面頂部